﻿using System.IO;

namespace AppToolkit.WPF.Utils
{
    /// <summary>
    /// Additional functionality around file paths.
    /// </summary>
    public class PathUtils
    {
        /// <summary>
        /// Splits a given filepath into its segments.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <returns></returns>
        public static string[] SplitPath(string path)
        {
            path = Path.GetFullPath(path);
            string[] paths = path.Split(new char[] { Path.DirectorySeparatorChar });
            paths[0] = paths[0] + "\\";
            return paths;
        }
    }
}